#!/usr/bin/evn python
# coding=utf-8

from ctypes import *
import ctypes
import sys
import os

dll = CDLL("TAEPS.dll")

requestcode = bytes("19408883693F5DF681096E25AE908543907E6A43DA9C3239D8CD9CE68E8FC6A4A9781C979FF38EC6D83702014738","gbk")
secretcode = bytes("91938128447792935411122401051308","gbk")
dll.GetMachineCode.restype = ctypes.c_char_p  # 修改lib.bar返回类型
machineCode = dll.GetMachineCode(requestcode, secretcode)
pyResult=ctypes.string_at(machineCode);
print(pyResult[16:28])

dll.GetPollCode.restype = ctypes.c_char_p  # 修改lib.bar返回类型
pRegisterCode = dll.GetPollCode(requestcode, 8, secretcode)

print(pRegisterCode)